import Vue from 'vue'
import Router from 'vue-router'
import Login from "../pages/Login"
import GoodsConf from "../pages/GoodsConf";
import OrdersConf from "../pages/OrdersConf";
import Infos from "../pages/Infos";
import Index from "../pages/Index";
import Main from "../pages/Main"
Vue.use(Router)

export default new Router({
  routes: [
    {
      path:'/',
      redirect:'/login'
    },
    {
      path: '/index',
      component: Index,
      children:[
        {
          path:'main',
          component: Main
        },
        {
          path:'goodsconfig',
          component: GoodsConf
        },
        {
          path:'ordersconfig',
          component: OrdersConf
        },
        {
          path:'infos',
          component: Infos
        },
      ]
    },
    {
      path:'/login',
      component: Login
    },
  ]
})
